package dataset.generation;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Iterator;

import org.mitre.jawb.atlas.AWBDocument;
import org.mitre.jawb.io.ParseSgml;
import org.mitre.jawb.io.SgmlDocument;
import org.mitre.jawb.io.SgmlElement;
import org.mitre.jawb.tasks.DefaultInlineImporter;
import org.mitre.jawb.tasks.Importer;
import org.mitre.jawb.tasks.Task;
import org.mitre.jawb.tasks.generic.GenericTask;
import org.mitre.jawb.tasks.phrase.PhraseTask;

public class TagAnalyzer {

	/**
	 * @param args
	 * @throws URISyntaxException 
	 * @throws IOException 
	 */
	public static void main(String[] args) throws URISyntaxException, IOException {
		// TODO Auto-generated method stub

		SgmlDocument sgml = new SgmlDocument(new FileReader(new File("/home/pjbarrio/Documents/RelationExtractionStuff/JSRE/jsre/jsre-1.1/jsre-1.1/examples/natural_disaster/files/2")));
		
		for (Iterator iterator = sgml.iterator(); iterator.hasNext();) {
			
			SgmlElement sgmlElement = (SgmlElement) iterator.next();
			
			System.out.println(sgmlElement.getStart());

		}
		
//		Task t = GenericTask.getInstance(new File("/home/pjbarrio/Software/Callisto/tasks/org.mitre.example.naturldisasterrelation.jar"));
//		
//		Importer importer = new DefaultInlineImporter(t, "txt");
//		
//		URI file = new URI("file:///home/pjbarrio/Documents/RelationExtractionStuff/JSRE/jsre/jsre-1.1/jsre-1.1/examples/natural_disaster/TET-193113.rdf.txt.sgml.aif.xml");
//		
//		AWBDocument aux = importer.importDocument(file, "UTF-8");
		
		
	}

}
